<?php
namespace app\api\controller;

use think\Controller;
use think\facade\Request;

class General extends Controller{
    
    /**
     * @desc 获取访问token
     */
    public function getAccessToken() {
        $params['secretId']    = Request::post('secretId');
        $params['secretKey']    = Request::post('secretKey');
    
        $logic = model('General', 'logic');
        $data = [];
        try {
            $data = $logic->getAccessToken($params);
        } catch (\Exception $e) {
            $logic->message = $e->getMessage();
        }
        return send_response($data, $logic->errorCode);
    }
}
